<?php
/**
 * index.class
 *
 * script
 *
 * @version:	0.1a
 * @package:	global
 * @author:	alex_ez
 * @created:	22.05.2009 01:23:25
 *
 * @copyright:	(c) 2009 alex <qfox@ya.ru> yaroshevich aka alex_ez. All rights reserved.
 */


class index_admin_controller extends admin_controller
{
	public function on_start( )
	{
		$this->visitor = visitor::instance();
		$this->visitor ->need_auth('admin');
		$this->frame = 'admin/!index.tpl';
	}
	
	// /admin/
	public function page_index( $p, $o ) {
		
		$this->title = __('Administer');

		$out = '';
		$out .= html_p('Hello ' . $this->visitor->viewuser->somename . '.');
		if (!empty($this->visitor->roles))
			$out .= html_p('Your roles are '.$this->visitor->roles . '.');
		return $out;
	}
	
	// /admin/test/
	public function page_test( $p, $o )
	{
		$this ->pageTitle = 'Cache';
		echo "hell in your map in your head.";
	}
	
	public function ajax_get( $p )
	{
		bc::log( request::instance( ) ->p_type );
		return array( );
	}
}


?>